<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <script src="./index.js"></script>
  </head>

  <body>
    <div id="app">
      <div class="inputs">
        <input type="text" v-model="name" />
        <input type="text" v-model="id" />
        <input type="text" v-model="phone" />
        <input type="text" v-model="address" />
        <input type="text" />
      </div>
      <div class="content">
        <div>name:<span>{{ name}}</span></div>
        <div>id:<span>{{id}}</span></div>
        <div>phone:<span>{{phone}}</span></div>
        <div>address:<span>{{address}}</span></div>
        <div>address:<span>{{ad}}</span></div>
      </div>
      <div class="operations">
        <button id="set-name">Set-Name-Xmo</button>
      </div>
    </div>
  </body>

  <script>
    const app = new Mvvm('#app', {
      data: {
        name: '',
        id: '',
        phone: '',
        address: '',
      },
    });

    document.querySelector('#set-name').addEventListener('click', () => {
      app.setData('name', 'Xmo');
    });
  </script>
</html>
